package com.atguigu.orderservice.client;

import com.atguigu.commonutils.Vo.UcenterMemberVo;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Feign服务调用
 * name属性被调用方服务名称
 * fallback属性执行Hystrix熔断实现类
 */
@FeignClient("service-ucenter")
@Component
public interface UcenterClient {

    /**
     * 根据用户id查询用户信息
     * @param memberId
     * @return
     */
    @GetMapping("/ucenterservice/ucenter/authVo/{memberId}")
    public UcenterMemberVo getMemberInfo(@ApiParam(value = "用户id",name = "memberId",required = true) @PathVariable String memberId);
}
